package com.idroc.coelacanth.service.client;

import com.idroc.coelacanth.core.dht.NodeActionObserver.NodeAction;
import com.idroc.coelacanth.core.membership.Endpoint;

public class StorageServantBroker {
	
	private NodeAction action = NodeAction.NULL; 
	
	private Endpoint servant = null;
	
	private StorageServantBroker backup = null;

	public StorageServantBroker getBackup() {
		return backup;
	}

	public void setBackup(StorageServantBroker backup) {
		this.backup = backup;
	}

	public Endpoint getServant() {
		return servant;
	}

	public void setServant(Endpoint servant) {
		this.servant = servant;
	}

	public NodeAction getAction() {
		return action;
	}

	public void setAction(NodeAction action) {
		this.action = action;
	}
	
	@Override
	public String toString() {

		StringBuilder sb = new StringBuilder();
		sb.append("StorageServantBroker[");
		sb.append("action:").append(action).append(",");
		sb.append("servant:").append(servant).append(",");
		sb.append("backup:").append(backup);
		sb.append("]");
		return sb.toString();
	}
}
